Package-level declarations

This package represents the data layer for the application,

TODO: Needs more info as this is a core feature of the application

Types

Link copied to clipboard
@Singleton
class BiWeeklyMoodRemoteDataSource @Inject constructor(fireStoreDatasource: FirebaseFirestore)

Data source class for interacting with the Firestore database to manage Bi-Weekly mood entries. This class handles adding and fetching mood entries from the Firestore database.

Link copied to clipboard
@Singleton
class BiWeeklyMoodRepository @Inject constructor(biWeeklyMoodRemoteDataSource: BiWeeklyMoodRemoteDataSource)

Repository class for managing Bi-Weekly mood data. This class interacts with the remote data source to fetch and add mood entries.

Link copied to clipboard
@Serializable
data class ChatLog(var id: String? = null, var logType: ChatBranch? = null, var content: List<ChatMessage> = listOf(), var createdAt: Date? = null, var toBeCompleted: Date? = null)

Represents a log of a chat activity or interaction. This contains a list of user messages, the chat branch type, and metadata like creation time and completion date. The chatbot's responses are not stored in the logs to save memory, as they are inferred from the log type.

Link copied to clipboard
@Serializable
data class ChatMessage(val sender: Sender = Sender.Null, val message: String = "", var createdAt: Date? = null)

Represents a single chat message in a conversation. A ChatMessage consists of the sender (either bot or user), the message content, and the timestamp of when the message was created.

Link copied to clipboard
@Singleton
class ChatRemoteDataSource @Inject constructor(fireStoreDatasource: FirebaseFirestore)

Data source for managing chat logs in Firestore. This class provides functions to add, delete, and retrieve chat logs from Firestore.

Link copied to clipboard
@Singleton
class ChatRepository @Inject constructor(chatRemoteDataSource: ChatRemoteDataSource)

Repository for managing chat logs. This class acts as a middle layer between the data source and the rest of the application.

Link copied to clipboard
@Serializable
data class DailyEvaluationEntry(val selectedEmotions: List<String> = listOf(), val emotionIntensities: List<Float> = listOf(0f, 0f, 0f), val emotionsMap: Map<String, Float> = mapOf(), val stressLevel: String = "default_initial", val strongestEmotion: Pair<String, Float> = Pair("", 0f), val dateCompleted: Date? = null)

Represents a daily mood evaluation entry that is used in the application. This includes the selected emotions, their intensities, a map of emotions to their values, the stress level, the strongest emotion (as a pair), and the date the entry was completed.

Link copied to clipboard
@Serializable
data class DailyEvaluationEntryDBSafe(val selectedEmotions: List<String> = listOf(), val emotionIntensities: List<Float> = listOf(0f, 0f, 0f), val emotionsMap: Map<String, Float> = mapOf(), val stressLevel: String = "default_initial", val strongestEmotionFirst: String? = null, val strongestEmotionSecond: Float = 0.0f, val dateCompleted: Date? = null)

Represents a daily mood evaluation entry that is stored safely in the database. This includes the selected emotions, their intensities, a map of emotions to their values, the stress level, the strongest emotions (first and second), and the date the entry was completed.

Link copied to clipboard
@Singleton
class DailyMoodRemoteDataSource @Inject constructor(fireStoreDatasource: FirebaseFirestore)

Data source for managing daily mood evaluations in Firestore. This class provides methods for adding, fetching, and listening to mood entries.

Link copied to clipboard
@Singleton
class DailyMoodRepository @Inject constructor(dailyMoodRemoteDataSource: DailyMoodRemoteDataSource)

Repository for managing daily mood evaluations. This repository serves as a middle layer between the data source and the application, handling operations related to daily mood entries.

Link copied to clipboard
object EmotionPairSerializer : KSerializer<Pair<String, Float>>

Serializer for the Pair of emotions and their intensities, allowing serialization and deserialization. This serializer encodes the emotion name as a string and its intensity as a float.

Link copied to clipboard
data class JournalEntry(var id: String = "", var title: String = "", var content: String = "", var createdAt: Date? = null)

Represents a journal entry that contains a title, content, and the date the entry was created.

Link copied to clipboard
@Singleton
class JournalRemoteDataSource @Inject constructor(fireStoreDatasource: FirebaseFirestore)

Data source class for managing journal entries in Firestore. This class is responsible for adding, deleting, updating, and fetching journal entries from the Firestore database.

Link copied to clipboard
@Singleton
class JournalRepository @Inject constructor(journalRemoteDataSource: JournalRemoteDataSource)

Repository class responsible for handling operations related to journal entries. It acts as a bridge between the data source and the rest of the application, providing methods to add, update, delete, and fetch journal entries.

Link copied to clipboard
@Singleton
class UserRepository @Inject constructor(accountService: AccountService, firestore: FirebaseFirestore, firebaseAuth: FirebaseAuth)

Repository class that manages user-related operations such as authentication state changes, retrieving user data (like email and display name) from Firestore, and interacting with the FirebaseAuth service.

Functions

Link copied to clipboard
Link copied to clipboard